package com.yixing.tech.wms.service;

import com.yixing.tech.common.base.BusinessException;
import com.yixing.tech.wms.entity.InStockWork;
import com.yixing.tech.wms.param.ContainerBindMaterialParam;
import com.yixing.tech.wms.param.ToApplyParam;
import org.bson.Document;

import java.util.List;

/**
 * 原材料入库服务
 *
 * @author yixing tech
 * @since 1.0.0
 */
public interface RawMaterialInStockService {

    /**
     * 申请库位
     */
    Document applyLocationByContainerCode(String containerCode) throws BusinessException;

    /**
     * 根据多个原材料入库单申请容器
     */
    List<InStockWork> applyContainerByInOrders(List<String> inOrders, String abc) throws BusinessException;

    List<Document> listToApplyParam(ToApplyParam param) throws BusinessException;
    /**
     * 查看申请成功的入库单明细
     */
    List<Document> listInStoking(ToApplyParam param);

    /**
     * 绑定物料到容器，申请库位，启动入库
     */
    boolean startStock(ContainerBindMaterialParam param) throws BusinessException;


    /**
     * 查询容器带绑定的信息
     */
    Object findContainerToBind(String containerCode) throws BusinessException;

    /**
     * 查询容器带绑定的信息，通过库位
     */
    Object findContainerToBindByLocation(String locationCode) throws BusinessException;

    /**
     * 查询容器带绑定的信息
     */
    Object findContainerToBindById(String bindId) throws BusinessException;

    boolean reportErp(String dtlId) throws BusinessException;

}
